const config = require('./config')
let app

App({

	onLaunch: function (launchData) {
		let app = this
		const { path, query, scene, shareTicket, referrerInfo } = launchData
		if (scene) {
			const sceneId = parseInt(launchData.scene)
			app.globalData.sceneId = sceneId
		}
		app.globalData.session = wx.getStorageSync('session')
		app.globalData.token = wx.getStorageSync('token')
	},

	globalData: {
		sceneId: null,
		logined: null,
		logining: null,
		session: '',
		token: '',
		userData: {},
		orderDataTemp: null,
		orderRemarkTemp: null,
		pageParams: null
	},

	config: config.production

})